home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / rexx / xdmd1.lha / Save.xdme < prev    next >
Text File  |  1994-10-24  |  663b  |  27 lines

  1. /* Save.xdme */
  2. /* Copyright © 1994 Fergus Duniho */
  3.  
  4. options results
  5. address 'XDME.1'
  6. 'rxresult $method'
  7. method = result
  8. compressor = "LIBS:compressors/xpk" || method || ".library"
  9. if method = "NONE" || ~exists(compressor) then do
  10.     saveold
  11. end
  12. else do
  13.     'writeto t:temp'
  14.     'rxresult $password'
  15.     password = result
  16.     if password = 0 then
  17.         xcom = 'execute (xpack t:temp method' method || ')'
  18.     else
  19.         xcom = 'execute (xpack t:temp method' method 'password "' || password || '")'
  20.     xcom
  21.     'rxresult $filename'
  22.     fullname = '"' || result || '"'
  23.     xcom = "execute (copy t:temp" fullname || ")"
  24.     xcom
  25.     call delete("t:temp")
  26. end
  27.